
<% @user.password = @user.password_confirmation = nil 
	user_form = form_first
%>
<% if @user.new_record? || @user.login.to_i < 0 %>
<tr>
	<td class="label_cell_form"><%= label_tag "user_name", User.human_attribute_name("name") %></td>
	<td class="label_input_form"><%= user_form.text_field :name %></td>
	
</tr>
<% end %>
<tr>
	<td class="label_cell_form"><%= label_tag "user_mail", Core.human_attribute_name("email") %></td>
	<td class="label_input_form"><%= user_form.text_field :email %></td>
</tr>
<tr>
	<td class="label_cell_form"><%= label_tag "user_password", User.human_attribute_name("password") %></td>
	<td class="label_input_form"><%= user_form.password_field :password %></td>
</tr>
<tr>
	<td class="label_cell_form"><%= label_tag "user_password_confirmation", User.human_attribute_name("password_confirmation") %></td>
	<td class="label_input_form"><%= user_form.password_field :password_confirmation %></td>
</tr>
<tr>
	<td class="label_cell_form"><%= label_tag "location_full_address", Location.human_attribute_name("full_address") %></td>
	<td class="label_input_form">  		
	  	<% user_form.fields_for :location_attributes, @user.location do |location_form| %>
				<%= location_form.text_field :full_address %>			
	    <% end %>
		<div id="location_name_readable"></div>
		<span id="edit_location_lnk" onclick="changeInputLocation('user_location_attributes_full_address')" class="mini_button_form">edit</span>
		<div style="clear:both;"><span></span></div>
		<div class="mini_tip"><span><%= I18n.t("location.example") %></span></div>						
	</td>
</tr>
<tr>
	<td class="label_cell_form"><%= label_tag "photo_data", User.human_attribute_name("photo") %></td>
	<td class="label_input_form">
		<%= render :partial => "/cores/image_field", :object => { :form => user_form, 
					:core_name => "user", :core_photo => @photo } %>			
	</td>
</tr>
<tr>
	<td class="label_cell_form"></td>
	<td class="label_input_form"><%= submit_tag I18n.t(@user.id ? 'user.edit_button' : 'user.sign_up_button'), :class => "button_form" %></td>
</tr>


